package org.sucri.dao;

import javax.persistence.*;
import java.sql.Timestamp;

/**
 * Created by IntelliJ IDEA.
 * User: Wen Yu
 * Date: Aug 30, 2007
 * Time: 11:26:55 PM
 * To change this template use File | Settings | File Templates.
 */
@Entity
@Table(catalog = "vpp", name = "News")
public class NewsEntity
{
  private int id;
  private String title;
  private String contents;
  private Timestamp createDate;
  private Timestamp lastmodifyDate;
  private String authorUname;

  @Basic
  @Column(name = "author_uname", nullable = false, length = 45)
  public String getAuthorUname()
  {
    return authorUname;
  }

  public void setAuthorUname(String authorUname)
  {
    this.authorUname = authorUname;
  }

  @Basic
  @Column(name = "lastmodify_date", nullable = false, length = 0)
  public Timestamp getLastmodifyDate()
  {
    return lastmodifyDate;
  }

  public void setLastmodifyDate(Timestamp lastmodifyDate)
  {
    this.lastmodifyDate = lastmodifyDate;
  }

  @Basic
  @Column(name = "create_date", nullable = false, length = 0)
  public Timestamp getCreateDate()
  {
    return createDate;
  }

  public void setCreateDate(Timestamp createDate)
  {
    this.createDate = createDate;
  }

  @Basic
  @Column(name = "contents", nullable = false, length = 65535)
  public String getContents()
  {
    return contents;
  }

  public void setContents(String contents)
  {
    this.contents = contents;
  }

  @Basic
  @Column(name = "title", nullable = false)
  public String getTitle()
  {
    return title;
  }

  public void setTitle(String title)
  {
    this.title = title;
  }

  @Id
  @Column(name = "id", nullable = false, length = 10)
  public int getId()
  {
    return id;
  }

  public void setId(int id)
  {
    this.id = id;
  }
}
